package com.yanqu.road.entity.monopolymarket.office.log;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.DataStatus;

/**
 * @Description 关引变更日志
 * @Author cwq
 * @Data 2021/4/15 18:49
 */
@FieldTypeAnnotation(tableName = "t_l_monopolymarket_user_physical_log_data")
public class MonopolyMarketUserPhysicalChangeLogData extends DataObject {
    @FieldTypeAnnotation(select = true,desc = "玩家id")
    private long userId;
    @FieldTypeAnnotation(desc = "占领的位置id -1表示未占领")
    private int posIndex;
    @FieldTypeAnnotation(desc = "位置等级")
    private int level;
    @FieldTypeAnnotation(desc = "位置编号")
    private int no;
    @FieldTypeAnnotation(desc = "变更类型 0重置 1成功抢夺消耗 2撤回 3道具获得 4失败抢夺消耗")
    private int type;
    @FieldTypeAnnotation(desc = "变更前数量")
    private long oldValue;
    @FieldTypeAnnotation(desc = "变更后数量")
    private long newValue;
    @FieldTypeAnnotation(desc = "时间")
    private int logTime;

    public MonopolyMarketUserPhysicalChangeLogData(long userId, int posIndex, int level, int no, int type, long oldValue, long newValue, int logTime) {
        this.userId = userId;
        this.posIndex = posIndex;
        this.level = level;
        this.no = no;
        this.type = type;
        this.oldValue = oldValue;
        this.newValue = newValue;
        this.logTime = logTime;
    }

    public long getUserId() {
        return userId;
    }
    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public int getPosIndex() {
        return posIndex;
    }
    public void setPosIndex(int posIndex) {
        if (this.posIndex != posIndex) {
            this.posIndex = posIndex;
            setOp(DataStatus.Update);
        }
    }

    public int getLevel() {
        return level;
    }
    public void setLevel(int level) {
        if (this.level != level) {
            this.level = level;
            setOp(DataStatus.Update);
        }
    }

    public int getNo() {
        return no;
    }
    public void setNo(int no) {
        if (this.no != no) {
            this.no = no;
            setOp(DataStatus.Update);
        }
    }

    public int getType() {
        return type;
    }
    public void setType(int type) {
        if (this.type != type) {
            this.type = type;
            setOp(DataStatus.Update);
        }
    }

    public long getOldValue() {
        return oldValue;
    }
    public void setOldValue(long oldValue) {
        if (this.oldValue != oldValue) {
            this.oldValue = oldValue;
            setOp(DataStatus.Update);
        }
    }

    public long getNewValue() {
        return newValue;
    }
    public void setNewValue(long newValue) {
        if (this.newValue != newValue) {
            this.newValue = newValue;
            setOp(DataStatus.Update);
        }
    }

    public int getLogTime() {
        return logTime;
    }
    public void setLogTime(int logTime) {
        if (this.logTime != logTime) {
            this.logTime = logTime;
            setOp(DataStatus.Update);
        }
    }

}
